{extend name="layout/main-block" /}

<!-- main content start -->
{block name="content"}
<section id="main-content">
    <section class="wrapper">
        <div class="row">
            <ol class="breadcrumb">
                <li class="h4"><a href="">首页</a></li>
                <li class="h4">账号管理</li>
                <li class="h4">账号列表</li>
            </ol>
        </div>
        <div class="row col-sm-1" style="margin-bottom: 20px;">
            <a href="{:url('account_create')}" class="btn btn-primary" role="button">添加账号</a>
        </div>
        <div class="row content-main">
            <div class="col-sm-12">
                <table class="table table-striped">
                    <tr>
                        <th>账号</th>
                        <th>手机</th>
                        <th>状态</th>
                        <th>上次登录时间</th>
                        <th>操作</th>
                    </tr>

                    {volist name="records" id="v" empty="$empty" }
                    <tr>
                        <td>{$v.username}</td>
                        <td>{$v.mobile}</td>
                        <td>{$v.status}</td>
                        <td>{$v.update_time}</td>
                        <td>
                            <a href="{:url('account_update', ['id'=>$v.account_id])}">修改</a>
                            <a href="{:url('account_delete', ['id'=>$v.account_id])}" onclick="return confirm('确定要删除吗？');">删除</a>
                            <a href="{:url('account_auth', ['id'=>$v.account_id])}">配置角色</a>
                        </td>
                    </tr>
                    {/volist}
                    
                </table>
            </div>
        </div>
    </section>
</section>
{/block}

{block name="javascript"}
{/block}